<div class="tabbable tabs-left">
              <ul class="nav nav-tabs">
              	<li><h5><?php echo $this->translate('编辑动态API'); ?></h5></li>
                <li class="active"><a data-toggle="tab" href="#express_a"><?php echo $this->translate('基本信息'); ?></a></li>
              </ul>
              <form class="form-horizontal" name="express_form" id="express_form" method="post" action="">
              <div class="tab-content">
    			<div id="sticky_navigation" style="height:30px;border-bottom:4px solid #DFDFDF;">
        			<div class="pull-left" style="font-size:16px;line-height:30px;"><strong><?php echo $this->translate('编辑动态API'); ?></strong></div>
        			<div class="pull-right">
                	<a href="<?php echo $this->url('express/default', array('action'=>'expressapi')); ?>" class="btn btn-small"><i class="icon-arrow-left"></i> <?php echo $this->translate('返回动态API列表'); ?></a>&nbsp;
                	<a href="<?php echo $this->serverUrl(true); ?>" class="btn btn-small btn-warning"><i class="icon-repeat icon-white"></i> <?php echo $this->translate('刷新'); ?></a>&nbsp;
                	<button type="submit" class="btn btn-small btn-primary"><i class="icon-ok icon-white"></i> <?php echo $this->translate('保存动态 API 信息'); ?></button>&nbsp;
                	<a href="<?php echo $this->myviewalias()->dbshopHelpUrl('express_api'); ?>" target="_blank" class="btn btn-small btn-info"><i class="icon-info-sign icon-white"></i> <?php echo $this->translate('查看帮助说明'); ?></a>
                	</div>
        		</div>
                <div id="express_a" class="tab-pane active">
                	<div class="well admin_add_header_well"><?php echo $this->translate('基本信息'); ?></div>
                	<div class="well admin_add_well">
						<p style="font-weight: bold;color: red;font-size: 15px;"><?php echo $this->translate('如果您已经成功申请到API，那么开启后一定要去 配送设置 里面把配送公司进行动态绑定，绑定后前台才显示物流动态。'); ?></p>
                    	<div class="control-group">
                  			<label for="input01" class="control-label"><?php echo $this->translate('API名称'); ?>：</label>
           					<div class="controls">
              					<label style="line-height: 30px;"><?php echo $this->escapeHtml($this->api_info['name']); ?></label>
            				</div>                        
                        </div>
                        <div class="control-group">
                            <label for="input01" class="control-label"><?php echo $this->translate('接口类型'); ?>：</label>
                            <div class="controls">
                                <select name="api_type" id="api_type" onchange="select_js();" class="span2">
                                    <option value="free" <?php if(!isset($this->api_info['api_type']) or (isset($this->api_info['api_type']) and $this->api_info['api_type'] == 'free')) echo 'selected'; ?>><?php echo $this->translate('免费版'); ?></option>
                                    <option value="customer" <?php if(isset($this->api_info['api_type']) and $this->api_info['api_type'] == 'customer') echo 'selected'; ?>><?php echo $this->translate('企业版'); ?></option>
                                </select>
                            </div>
                        </div>
                        <div class="control-group customer">
                            <label for="input01" class="control-label"><?php echo $this->translate('企业编号'); ?>(Secret)：</label>
                            <div class="controls">
                                <input type="text" id="api_secret"  name="api_secret" class="span6" value="<?php if(isset($this->api_info['api_secret'])) echo $this->api_info['api_secret']; ?>">
                            </div>
                        </div>
                    	<div class="control-group">
                  			<label for="input01" class="control-label">KEY：</label>
           					<div class="controls">
              					<input type="text" id="api_key"  name="api_key" class="span6" value="<?php if(isset($this->api_info['api_code'])) echo $this->api_info['api_code']; ?>">
            				</div>                        
                        </div>
                    	<div class="control-group">
                  			<label for="input01" class="control-label"><?php echo $this->translate('API状态'); ?>：</label>
           					<div class="controls">
              					<label class="radio inline"><input type="radio" value="1" <?php if($this->open_api and $this->open_api['name_code'] == $this->api_info['name_code']) echo 'checked="checked"'; ?> name="api_state"><?php echo $this->translate('开启'); ?></label>
                                <label class="radio inline"><input type="radio" value="0" <?php if(($this->open_api and $this->open_api['name_code'] != $this->api_info['name_code']) or !$this->open_api) echo 'checked="checked"'; ?> name="api_state"><?php echo $this->translate('关闭'); ?></label> 
            				</div>                        
                        </div>
                                                                                                                                               
                  	</div>
                </div>
                                
                
             </div>
              </form>
</div>
<script>
    function select_js() {
        var api_type = $('#api_type').val();
        if(api_type == 'customer') {
            $('.customer').show();
        } else {
            $('.customer').hide();
        }
    }
    select_js();
</script>